<?php

namespace App\Jobs;

use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;

class MyJobs implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    private array $arg;
    /**
     * Create a new job instance.
     */
    public function __construct(array $arg = [])
    {
        $this->arg = $arg;
        //MyJobs::dispatch(range(1, 6))->delay(10);
    }

    /**
     * Execute the job.
     */
    public function handle(): void
    {
        payLog($this->arg);
        payLog();
    }
}
